<?php
class ome_goods_product{
    public function checkProductByBn($bn){
        $productObj = &app::get('ome')->model('products');
        $productInfo = $productObj->dump(array('bn'=>$bn),"product_id");

        if(!$productInfo){
            return false;
        }
        return $productInfo['product_id'];
    }
    
    public function getProductByBn($bn){
        $productObj = &app::get('ome')->model('products');
        $productInfo = $productObj->dump(array('bn'=>$bn),"product_id,bn,name");

        if(!$productInfo){
            return false;
        }
        return $productInfo;
    }
}
